package indi.zhifa.study2024.nbr.monitor.gen.busy.user.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.Fastjson2TypeHandler;
import indi.zhifa.core.mpenhance.entity.po.BaseEntity;
import indi.zhifa.study2024.common.auth.entity.EnpBelongEntity;
import indi.zhifa.study2024.nbr.monitor.gen.monitor.user.po.json.RoleInfo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author 织法
 * @since 2024-11-02
 */
@Data
@TableName(value = "user", autoResultMap = true)
@Schema(title = "GenBusyUserEntity对象", description = "用户表")
public class GenBusyUserEntity extends EnpBelongEntity {

    @Schema(title = "用户名")
    private String userName;

    @Schema(title = "密码")
    private String passwd;

    @Schema(title = "用户昵称")
    private String nickName;

    @TableField(typeHandler = Fastjson2TypeHandler.class)
    @Schema(title = "角色信息")
    private List<RoleInfo> roles;

    public GenBusyUserEntity() {
        roles = new ArrayList<>();
    }
}
